package fun.easycode.webterminal.service.cmd;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import fun.easycode.webterminal.common.contract.EnumeratorDeserializer;
import fun.easycode.webterminal.common.contract.EnumeratorSerializer;
import fun.easycode.webterminal.common.contract.IValidate;
import fun.easycode.webterminal.dao.TunnelType;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class MachineTunnelSaveCmd  implements IValidate {
    private String id;
    @NotEmpty
    private String name;
    @NotEmpty
    private String machineId;
    @NotNull
    @JsonSerialize(using = EnumeratorSerializer.class)
    @JsonDeserialize(using = EnumeratorDeserializer.class)
    private TunnelType type;
    @NotEmpty
    private String localIp;
    @NotNull
    private Integer localPort;
    private String remoteIp;
    private Integer remotePort;
}
